# -*- coding: utf-8 -*-
from __future__ import unicode_literals

from django.db import models
import datetime
# Create your models here.


class AdsInfo(models.Model):
    adtitle = models.CharField(max_length=100, verbose_name=u'广告名称', unique=False, help_text='广告名称')  # 标题可以重复
    price = models.FloatField(verbose_name=u'广告出价', default=0.0, help_text='广告出价')
    AllPlayTimes = models.IntegerField(verbose_name=u'预播总次数',  help_text='预播总次数',  default=0)
    class Meta:
        verbose_name = u"广告信息"
	verbose_name_plural = verbose_name
    def __unicode__(self):
        return self.adtitle

class Party(models.Model):
    create_date = models.DateTimeField(auto_now_add=True)
    content = models.TextField()
    title = models.CharField(max_length=50, default='this is a party')
    address = models.CharField(max_length=50, default="ShangHai")
    is_off = models.BooleanField(default=False)
    link = models.CharField(max_length=200, default="http://www.baidu.com")

    class Meta:
        #返回按照日期排序
        ordering = ('create_date',)

class Person(models.Model):
    name = models.CharField(max_length=20, default='Lao')
    weight = models.FloatField()
    height_cm = models.IntegerField()
    
